﻿package mortal.game.proxy
{
    import Framework.Util.*;
    import Message.Game.*;
    import extend.language.*;
    import mortal.common.error.*;
    import mortal.game.manager.*;
    import mortal.game.resource.info.item.*;
    import mortal.game.view.wizard.*;
    import mortal.mvc.core.*;

    public class WizardProxy extends Proxy
    {
        private var _wizardCache:WizardCache;

        public function WizardProxy()
        {
            this.init();
            return;
        }// end function

        private function init() : void
        {
            this._wizardCache = this.cache.wizard;
            return;
        }// end function

        public function openSpriteSystem() : void
        {
            rmi.iSprite.openSpriteSystem_async(new AMI_ISprite_openSpriteSystem());
            return;
        }// end function

        public function activeSprint(param1:ItemData) : void
        {
            rmi.iSprite.activeSprint_async(new AMI_ISprite_activeSprint(this.activeSuccess, null, param1.itemInfo.effect), param1.serverData.uid);
            return;
        }// end function

        private function activeSuccess(param1:AMI_ISprite_activeSprint) : void
        {
            return;
        }// end function

        public function changeSprite(param1:int) : void
        {
            rmi.iSprite.ChangeSprite_async(new AMI_ISprite_ChangeSprite(this.changeSuccess, this.changeFail), param1);
            return;
        }// end function

        private function changeSuccess(param1:AMI_ISprite_ChangeSprite) : void
        {
            MsgManager.showRollTipsMsg(Language.getString(20595));
            return;
        }// end function

        private function changeFail(param1:Exception) : void
        {
            MsgManager.showRollTipsMsg(ErrorCode.getErrorStringByCode(param1.code));
            return;
        }// end function

        public function setName(param1:int, param2:String) : void
        {
            rmi.iSprite.setName_async(new AMI_ISprite_setName(), param1, param2);
            return;
        }// end function

        public function spriteEvolution(param1:int, param2:int = 0, param3:int = 0) : void
        {
            rmi.iSprite.SpriteEvolution_async(new AMI_ISprite_SpriteEvolution(), param1, param2, param3);
            return;
        }// end function

        public function upgradeMeridian(param1:int) : void
        {
            rmi.iSprite.UpgradeMeridian_async(new AMI_ISprite_UpgradeMeridian(this.upgradeSuccess, this.upgradeFail), param1);
            return;
        }// end function

        private function upgradeSuccess(param1:AMI_ISprite_UpgradeMeridian) : void
        {
            return;
        }// end function

        private function upgradeFail(param1:Exception) : void
        {
            MsgManager.showRollTipsMsg(ErrorCode.getErrorStringByCode(param1.code));
            return;
        }// end function

        public function dressWizardEquip(param1:int, param2:String, param3:String) : void
        {
            rmi.iSprite.dressSpriteEquip_async(new AMI_ISprite_dressSpriteEquip(), param1, param2, param3);
            return;
        }// end function

        public function upgradeSpriteSkill(param1:int) : void
        {
            rmi.iSprite.upgradeSpriteSkill_async(new AMI_ISprite_upgradeSpriteSkill(), param1, "1");
            return;
        }// end function

    }
}
